package com.jluzh10.learning.service.Impl;

import com.jluzh10.learning.dao.TeacherMapper;
import com.jluzh10.learning.domain.Teacher;
import com.jluzh10.learning.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author yzg
 * @create 2019/5/26
 */
@Service
@Transactional
public class TeacherServiceImpl implements TeacherService {

    private final TeacherMapper teacherMapper;

    @Autowired
    public TeacherServiceImpl(TeacherMapper teacherMapper) {
        this.teacherMapper = teacherMapper;
    }

    @Override
    public Teacher selectOneById(Integer teacherId) {
        return teacherMapper.selectByPrimaryKey(teacherId);
    }
}
